Skip to content

fix(ci): publish to JSR (Deno project), not npm — repair broken publish#39

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/publish-jsr-not-npm
Jun 25, 2026
Merged

fix(ci): publish to JSR (Deno project), not npm — repair broken publish#39
hyperpolymath merged 1 commit into
mainfrom
fix/publish-jsr-not-npm

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

This is the 'how did it just surface' repo. preference-injector is Deno+ReScript (deno.json, JSR name @hyperpolymath/preference-injector, no package.json), but publish.yml ran npm ci/npm publish — impossible without a package.json. Because the publish job only runs on release, it silently failed only at release time, so it stayed invisible until the provenance audit was the first thing to actually read it.

Fix: switch to JSR (the correct registry) — setup-denodeno task builddeno publish, with id-token: write so JSR records build provenance natively. Adds the missing exports to deno.json.

⚠️ First release validates the build chain: deno task build runs rescript build — if the ReScript toolchain isn't available in CI (no package.json to install it from), that's a pre-existing build gap to close separately. Also note the repo is mid ReScript→AffineScript migration. 🤖 Generated with Claude Code

preference-injector is Deno + ReScript (deno.json, JSR name, NO package.json),
but publish.yml ran 'npm ci / npm publish' — which can never work without a
package.json (this is why the failure only ever surfaced at release time). The
correct registry is JSR. Switches publish.yml to setup-deno -> deno task build
-> deno publish, with id-token: write so JSR records build provenance natively.
Adds the required 'exports' to deno.json (was missing, so JSR couldn't resolve
the entry).

NOTE: first release will validate the build chain — 'deno task build' runs
'rescript build', which needs the ReScript toolchain available in CI; if that
toolchain isn't wired (no package.json to install rescript from), that's a
pre-existing build gap to close separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit 63678c7 into main Jun 25, 2026
11 of 27 checks passed
@hyperpolymath
hyperpolymath deleted the fix/publish-jsr-not-npm branch June 25, 2026 09:31
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant